#!/usr/bin/env python3

import pexpect
import sys

if __name__ == "__main__":

    computers = dict()
    computers["remote"] = ("10.8.0.1", "4213")
    computers["route"] = ("192.168.200.1", "root4213")

    key = "remote" if len(sys.argv) < 2 else sys.argv[1]
    ip, pwd = computers[key]
    child = pexpect.spawn("ssh root@%s" % ip)
    child.expect("root@%s's password:" % ip)
    child.sendline(pwd)
    child.interact(input_filter=None, output_filter=None)
